package com.decent.ejfadmin.report.dao;

import com.decent.ejfadmin.report.dao.provider.CollectCardApiStockReportDaoProvider;
import com.decent.ejfadmin.report.response.DouLeFaceValueTotal;
import com.decent.ejfadmin.report.response.DouLeProductTypeTotal;
import com.decent.ejfadmin.report.response.DouLeProvinceTotal;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 给易服务统计的接口
 *
 * @author weicx
 * @date 2019/03/12
 */
@Mapper
@Repository
public interface CollectCardApiStockReportDao {


    /**
     * 收卡卡密库存统计
     *
     * @return 总数
     */
    @SelectProvider(type = CollectCardApiStockReportDaoProvider.class, method = "collectCardStockReport")
    List<DouLeProductTypeTotal> collectCardStockReport();


    /**
     * 收卡卡密库存面值省份统计
     *
     * @param productType 运营商
     * @return
     */
    @SelectProvider(type = CollectCardApiStockReportDaoProvider.class, method = "collectCardFaceReport")
    List<DouLeProvinceTotal> collectCardStockPricePage(@Param("productType") Integer productType);


    /**
     * 收卡卡密库存折扣省份统计
     *
     * @param productType 运营商
     * @param province    省份
     * @param faceValue   面值
     * @return
     */
    @SelectProvider(type = CollectCardApiStockReportDaoProvider.class, method = "collectCardPriceReport")
    List<DouLeFaceValueTotal> collectCardPriceReport(@Param("productType") Integer productType, @Param("province") String province, @Param("faceValue") Integer faceValue);
}
